import { createRouter, createWebHashHistory } from "vue-router";
import store from "../store";
import rests from "./rests";
const router = createRouter({
  history: createWebHashHistory(),
  routes: [...rests],
});

router.beforeEach(async (to: any, from, next) => {
  store.state.IfTheFullScreen = to.meta.IfTheFullScreen;
  store.state.routerName = to.name;
  next();
});

export default router;
